import re
import requests
import baozou_insert_sql
def zhangdu1():
    r = requests.session()
    url = "https://novel.zhangdu520.com/default/login"
    date = {
        "username": "",
        "password": "",
        "act": "login"
    }
    Platform = "掌都1_定制小说"
    rr = r.post(url=url,data= date )
    # print(rr.text)
    aa = r.get(url="https://novel.zhangdu520.com/pay/income")
    # print(aa.text)

    html = aa.text.replace('\r','').replace('\n','').replace('\t','')
    date_time = re.findall('<tbody>.*?<td>(.*?)</td>',html)

    Amount_share = re.findall('<tbody>.*?<td>90%.*?<td>¥(.*?)</td>',html)
    # print(date_time,Amount_share)
    baozou_insert_sql.baozou_spider_everyday_sum(date_time[0],Amount_share[0],Platform)

